/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Tables.database;

import Tables.AbstractTable;
import java.util.Date;
import java.util.List;

/**
 *
 * @author FOE
 */
public class User extends AbstractTable{
    private int id;
    private String userName;
    private String email;
    private String password;
    private Date birthDate;
    private int countryId;
    private int status;
    private String gender;
    private List<Country> countries;
    public User(int id, String userName, String email, String password, Date birthDate , List<Country> countries) {
        this.id = id;
        this.userName = userName;
        this.email = email;
        this.password = password;
        this.birthDate = birthDate;
        
    }

    public User() {
    }
    
    /**
     * @return the id
     */
    public int getId() {
        return id;
    }

    /**
     * @param id the id to set
     */
    public void setId(int id) {
        this.id = id;
    }

    /**
     * @return the userName
     */
    public String getUserName() {
        return userName;
    }

    /**
     * @param userName the userName to set
     */
    public void setUserName(String userName) {
        this.userName = userName;
    }

    /**
     * @return the email
     */
    public String getEmail() {
        return email;
    }

    /**
     * @param email the email to set
     */
    public void setEmail(String email) {
        this.email = email;
    }

    /**
     * @return the password
     */
    public String getPassword() {
        return password;
    }

    /**
     * @param password the password to set
     */
    public void setPassword(String password) {
        this.password = password;
    }

    /**
     * @return the birthDate
     */
    public Date getBirthDate() {
        return birthDate;
    }

    /**
     * @param birthDate the birthDate to set
     */
    public void setBirthDate(Date birthDate) {
        this.birthDate = birthDate;
    }

    public void setCountryId(int countryId) {
        this.countryId = countryId;
    }

    public int getCountryId() {
        return countryId;
    }
    
//    public String getCountryName()
//    {
//        Country country=new Country();
//        country.setCountryId(countryId);
//        int index = getCountries().indexOf(country);
//        country = getCountries().get(index);
//        return country.getCountryName();
//    }
//    public void setCountryId(String country)
//    {
//        Country c = new Country();
//        c.setCountryName(country);
//        int index = getCountries().indexOf(country);
//        c = getCountries().get(index);
//        setCountryId(c.getCountryId());
//    }

    /**
     * @return the status
     */
    public int getStatus() {
        return status;
    }

    /**
     * @param status the status to set
     */
    public void setStatus(int status) {
        this.status = status;
    }

    /**
     * @return the gender
     */
    public String getGender() {
        return gender;
    }

    /**
     * @param gender the gender to set
     */
    public void setGender(String gender) {
        this.gender = gender;
    }

    /**
     * @return the countries
     */
    public List<Country> getCountries() {
        return countries;
    }

    /**
     * @param countries the countries to set
     */
    public void setCountries(List<Country> countries) {
        this.countries = countries;
    }
}
